package com.tensquare.recruit.controller;

import entity.Result;
import entity.StatusCode;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
public class RecuritExceptionHandler {

    @ExceptionHandler(value = Exception.class)
    public Result catchException(Exception e){
        e.printStackTrace();
        return new Result(StatusCode.ERROR,e.getMessage(),false,null);
    }
}
